import json


with open('class_id.txt') as f:
    lines = f.readlines()

lines = [l.split('\t')[1].strip() for l in lines if len(l.strip()) != 0]

with open('class_id.json', 'w') as f:
    json.dump(lines, f, indent=4)



